package com.sheep.opt;

import com.sheep.opt.ThreadUtil;
import org.apache.ibatis.session.SqlSession;

/**
 * Created by IntelliJ IDEA.
 * User: wnj
 * Date: 2010-11-15
 * Time: 11:06:52
 * To change this template use File | Settings | File Templates.
 */
public abstract class AbstractDao {
    protected SqlSession session;
    public AbstractDao() {
        try {
            session = ThreadUtil.getSqlSession();
        }
        catch (Exception e) {
            e.printStackTrace();
        }

        if (session != null) {
            getMapper();
        }
    }

    abstract public void getMapper();
}
